package operation.observer.abs;

public abstract class Observer {
    protected float temperature;
    protected float humidity;
    protected String name;

    public Observer(String name) {
        this.name = name;
    }

    public abstract void update(float temperature, float humidity);

    protected void display() {
        System.out.println("======" + name + "=========");
        System.out.println("temperature: " + temperature);
        System.out.println("humidity: " + humidity);
    }
}
